﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using XmlStudio.DataLayer;

namespace XmlStudio.Models.Events {
    /// <summary>
    /// Event arguments for NodeSelected event.
    /// </summary>
    /// <typeparam name="TNode">The type of the node.</typeparam>
    public class NodesSelectedEventArgs<TNode> : EventArgs
        where TNode : BigXmlNode {
        /// <summary>
        /// Gets or sets the nodes.
        /// </summary>
        /// <value>The nodes.</value>
        public ReadOnlyCollection<TNode> Nodes { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="NodesSelectedEventArgs&lt;TNode&gt;"/> class.
        /// </summary>
        /// <param name="nodes">The nodes.</param>
        public NodesSelectedEventArgs(IList<TNode> nodes) {
            this.Nodes = new ReadOnlyCollection<TNode>(nodes);
        }
    }
}
